<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style type="text/css">
    .active {
      color: red;
    }
    .big {
      font-weight: bolder;
      font-size: 36px;
    }
  </style>
</head>
</head>
<body>
<div id="app">
 <div :class="myclass">红色的字</div>
  <p>
    <button @click="changeStyle">改变样式</button>
  </p>
</div>
<!-- 1:引包 -->
<script type="text/javascript" src="../../node_modules/vue/dist/vue.js"></script>
<script type="text/javascript">
  new Vue({
    el: "#app",
   data:{
      myclass:{
        active:true,
        big:true
      }
   },
    methods:{
      changeStyle:function(){
        this.myclass.active=!this.myclass.active
        this.myclass.big=!this.myclass.big
      }
    }

  })
</script>
</body>
</html>
